Imports System.Windows.Forms

Friend Class frmConnection

    Sub New()
        ' This call is required by the Windows Form Designer.
        InitializeComponent()

        ' Add any initialization after the InitializeComponent() call.
    End Sub
    ''' <summary>
    ''' Constructor for the Form new connection
    ''' </summary>
    ''' <param name="sPreviousFile">complete path and filename for linked bikirom file</param>
    ''' <param name="match">true if bikirom download required</param>
    ''' <remarks></remarks>
    Sub New(ByVal sPreviousFile As String, ByVal match As Boolean)
        Me.New()
        If sPreviousFile.Length = 0 Then
            btnFile.Visible = False
        Else
            'If match = False Then btnBikiRom.Visible = False
            If sPreviousFile.Length >= 40 Then
                tbPrevious.Text = GetShortPath(sPreviousFile) & GetFileName(sPreviousFile)
            Else
                tbPrevious.Text = sPreviousFile
            End If
        End If
    End Sub

    Private Sub btnBikiRom_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBikiRom.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.Close()
    End Sub
    Private Sub btnFile_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFile.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Yes
        Me.Close()
    End Sub
    Private Sub btnOffline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOffline.Click
        Me.DialogResult = System.Windows.Forms.DialogResult.Abort
        Me.Close()
    End Sub
End Class
